Skip to main content

addIconFamily

Type

handler

Summary

Add an icon family to the iconsvg library.

Syntax

addIconFamily(<pFamily>,<pIconData>)

Description

Add icons to the iconsvg library.

Note: If the family already exists, then the data will be merged. Icons with matching names will be replaced. To replace a family, use deleteIconFamily first.

Parameters

NameTypeDescription

pFamily

The family for the icons.

pIconData

The icon data. Each key is an icon name with a key for the SVG data and a key for the codepoint.

Examples

// Add an icon family called "Shapes" consisting of square and circle icons
local tIconData
put "M10 10 H90 V90 H10 L10 10" into tIconData["square"]["svg"]
put "FFFE" into tIconData["square"]["codepoint"]
put "M100 100 m-50 0 a50 50 0 1 0 100 0 a50 50 0 1 0 -100 0" into tIconData["circle"]["svg"]
put "FFFF" into tIconData["circle"]["codepoint"]
addIconFamily "Shapes", tIconData

handler: addIcon, deleteIconFamily, iconFamilies, iconList, iconListForFamily, iconNames, iconNamesForFamily